package edu.jd.movieplatform.info.hall;


import edu.jd.movieplatform.common.Result;
import edu.jd.movieplatform.info.movie.Movie;
import edu.jd.movieplatform.info.movie.MovieDto;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/info/hall")
public class HallAPI {

    @Resource
    private HallService hallService;

    @RequestMapping("/hall-list")
    public Result hallList(HallDto dto){

        List<Hall> hallList = hallService.findHallList(dto);
        return Result.success(hallList);


    }

    @RequestMapping("/hall-list-byid")
    public Result hallListbyid(Integer cnm_hall_id,Integer cnm_id){

        HallDto dto = new HallDto();
        dto.setCnm_hall_id(cnm_hall_id);
        dto.setCnm_id(cnm_id);

        List<Hall> hallList = hallService.findHallList(dto);
        return Result.success(hallList);


    }

}
